home *** CD-ROM | disk | FTP | other *** search
- .xlist
- if1
- %out COM.ASM
- endif
- if2
- %out *** PASS 2
- endif
- name NAME
- title TITLE
- subttl SUBTITLE
- page 66,132
- .list
-
- ; ************************************************************************
- ; ** **
- ; ** filename: com.asm **
- ; ** **
- ; ** Provides a template for MS-DOS .COM assembly language programs. **
- ; ** **
- ; ************************************************************************
-
- ; define bios and dos interrupts, functions, and services
- .xlist
- include bios_dos.inc
- .list
-
- ; define constants
- .xlist
- include equates.inc
- .list
-
- code segment public
- assume cs:code,ds:code
-
- org 0 ; PSP
-
- term_inst dw (?) ; terminate (int 20H) instruction
- mem_size dw (?) ; size of available memory
- reserved_0 db (?) ; reserved (normally 0)
- call_dispatch db 5 dup (?) ; call to DOS function dispatcher
- term_vec dd (?) ; terminate vector
- brk_vec dd (?) ; break vector
- err_vec dd (?) ; error vector
- dos_use db 22 dup (?) ; used by DOS
- env_ptr dw (?) ; environment string pointer
- dos_work db 34 dup (?) ; DOS work area
- int21_retf db 3 dup (?) ; int 21 and retf instructions
- reserved_1 db 2 dup (?) ; reserved
- fcb_1_ext db 7 dup (?) ; FCB 1 extension
- fcb_1 db 9 dup (?) ; FCB 1
- fcb_2_ext db 7 dup (?) ; FCB 2 extension
- fcb_2 db 20 dup (?) ; FCB 2
- dta equ $ ; default dta
- attrib equ $ + 21 ; found file attribute
- ftime equ $ + 22 ; found file time stamp
- fdate equ $ + 24 ; found file date stamp
- fsize equ $ + 26 ; found file size
- fname equ $ + 30 ; found file asciiz filename
- parm_size db (?) ; parameter size
- parm db 127 dup (?) ; parameter
-
-
- org 100H ;
-
- pgm:
- jmp start ; don't execute data
-
-
- ; data storage
- ; YOUR DATA HERE!
-
- start:
- ; YOUR PROGRAM HERE!
- int dos_term ; terminate program
-
- code ends
-
- end pgm